Links (
<a>
): Used to create hyperlinks. Thehref
attribute contains the URL of the link.<a href="https://www.example.com">Visit our website</a>
Images (
<img>
): Used to embed images. Thesrc
attribute contains the path to the image file.<img src="image.jpg" alt="Description of the image">
Lists (
<ul>
,<ol>
,<li>
): Used to create unordered and ordered lists.<ul> <li>Item 1</li> <li>Item 2</li> </ul> <ol> <li>First</li> <li>Second</li> </ol>
Forms (
<form>
,<input>
,<button>
): Used for user input. Theaction
attribute in the<form>
tag specifies where to send the form data.<form action="/submit" method="post"> <label for="username">Username:</label> <input type="text" id="username" name="username"> <label for="password">Password:</label> <input type="password" id="password" name="password"> <button type="submit">Submit</button> </form>
Divisions (
<div>
): Acts as a container for other HTML elements. It's often used to group elements and apply styles.<div> <p>This is a paragraph inside a division.</p> <img src="image.jpg" alt="An image inside a division"> </div>